Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix runtime search path for shared-lib and add '-static' to the name of static-lib. #5616

Merged
merged 2 commits into from
Oct 21, 2021

Conversation

arbipher
Copy link
Contributor

As discussed in #5578, this fix will solve the long-lasting linking problem of the OCaml binding of z3 shared lib.

The explanation is already here.

For short, the commit

  1. Add the path of where the libz3.so will be installed later into LIBZ3(a.k.a. the OCaml z3 lib). Later, either ocamlc and ocamlopt can find it without extra config.
  2. Since we will have two opam libraries z3 and z3-static, by the default name convention of ocamlmklib, both will be dllz3ml.so, which will result in the failure of the installation into opam-site-lib/stublibs. I rename the static one to dllz3ml-static.so by using -oc .... We don't need to change other files e.g. z3ml.cm* since they will be installed in its own path opam-site-lib/{z3,z3-static}.

To check the associated opam files, they are in my fix-ocaml-binging-with-opam branch, which is one extra commit ahead of this branch in PR.

@arbipher
Copy link
Contributor Author

I am not sure about the change on META.in so I revert it.

#2639 and this StackOverflow mentions the problem of its lacking.

The problems on libstd++ and libc++ may appear but it would be discussed in the future. Maybe it could be solved?(search compatibility) by them.

@NikolajBjorner NikolajBjorner merged commit cd8d8bb into Z3Prover:master Oct 21, 2021
@NikolajBjorner
Copy link
Contributor

Thanks!
Can you instruct me how to update azure-pipelines.yml with suitable build options to exercise the update better (say, on Mac) or add PR for this too?

@arbipher
Copy link
Contributor Author

Sure. I will check the commands with each building settings and make the PR for azure-pipeline.yml (maybe also some changes on the script to gen build/Makefile) this weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants